
mat = load('ktf.txt');
% k = mat.k;
% t = mat.t;
k = mat(:,1);
t = mat(:,2);
f = mat(:,3);
data = load('TwoGauss_2M_data.txt');

% figure; plot(sort(k,'descend'),'.k')
figure; 
% subplot(121),semilogy(sort(k,'descend'),'.k'),title('K')
% subplot(122),semilogy(sort(t,'descend'),'.k'),title('Time(us)')


subplot(1,3,1),plot(sort(k,'descend'),'.k'),title('K')
set(gca,'xscale','log')
% set(gca,'yscale','log')
xlim([0, 1e6])
subplot(1,3,2),plot(sort(t,'descend'),'.k'),title('Time(us)')
set(gca,'xscale','log')
xlim([0, 1e6])

subplot(1,3,3),plot(sort(f,'descend'),'.k'),title('Time(us)')
set(gca,'xscale','log')
xlim([0, 1e6])
shg
figure;boxplot(k)
figure;boxplot(t);
figure;bar([sum(k>10^6) sum(k>10^5),sum(k>10^4),sum(k>10^3),sum(k>-1)])
set(gca,'yscale','log')
% ylim([0, 1e6])
figure;
scatter(data(:,1),data(:,2),5,f,'filled')
shg